module lang.d.dlanguage;

import utils.log;

import lang.language;
import lang.d.lexer.dlexer;
import lang.d.parser.dparser;
import lang.d.dnamesvalidator;
import lang.d.sts.dsyntaxelement;

class DLanguage: Language {
    static this() {
        ourInstance = new shared(DLanguage());
    }

    override public static shared(Language) getInstance() {
        return ourInstance;
    } 

    override public shared(DSyntaxElement) analize(in string text) shared {
        debug Log.message("analize");
        return (new DParser).parse(text);
    }

    private this() {
        myNamesValidator = new DNamesValidator();
    }
}
